package ibmetp.mis.controller.role;

import ibmetp.mis.service.RoleService;
import ibmetp.mis.service.UserService;
import ibmetp.mis.serviceImpl.RoleServiceImpl;
import ibmetp.mis.serviceImpl.UserServiceImpl;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * Servlet implementation class RoleDelServlet
 */
public class RoleDelServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;
       
    /**
     * @see HttpServlet#HttpServlet()
     */
    public RoleDelServlet() {
        super();
        // TODO Auto-generated constructor stub
    }

	/**
	 * @see HttpServlet#service(HttpServletRequest request, HttpServletResponse response)
	 */
	protected void service(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
		// TODO Auto-generated method stub
		System.out.println("Calling RoleDelServlet..");
		//用户Id数组
		String roleIds=request.getParameter("roleId");
		
		//删除用户
		if(roleIds!=null){
			System.out.println("Del roleIds:"+roleIds);
			RoleService ds=new RoleServiceImpl();
			ds.deleteRoleByIds(roleIds);		
		}	
	}
}
